x86/PCI: fix guest_io_read() when pci_cfg_ok() denies access
authorJan Beulich <jbeulich@suse.com>
Fri, 22 Jun 2012 08:04:30 +0000 (10:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 22 Jun 2012 08:04:30 +0000 (10:04 +0200)
commitfdcf7a9316cacf059b09558700a8be71fdc094fe
tree3f72654e538f907ee6112ebc51b8a58678d2a498
parentb1a4a51944c6acec9878fdfbee1b9432477af862
x86/PCI: fix guest_io_read() when pci_cfg_ok() denies access

For a multi-byte aligned read, this so far resulted in 0x00ff to be
put in the guest's register rather than 0xffff or 0xffffffff, which in
turn could confuse bus scanning functions (which, when reading vendor
and/or device IDs, expect to get back all zeroes or all ones).

As the value gets masked to the read width when merging back into the
full result, setting the initial value to all ones should not harm any
or the other cases.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/traps.c